Skip to content

feat(ai-sdk): re-export 7-tool surface - #1433

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/ai-sdk-tool-reexports
Sep 1, 2026
Merged

feat(ai-sdk): re-export 7-tool surface#1433
graphite-app[bot] merged 1 commit into
mainfrom
feat/ai-sdk-tool-reexports

Conversation

@Dhravya

@Dhravya Dhravya commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Re-export full tool set from @supermemory/tools/ai-sdk
  • Add unit tests for tool re-exports

Stacked on #1432

Test plan

  • bun run test:unit in packages/ai-sdk

Made with Cursor

@claude

claude Bot commented Aug 8, 2026

Copy link
Copy Markdown

Claude finished @Dhravya's task in 1m 1s —— View job


Reviewing PR #1433

  • Fetch PR diff and existing review comments
  • Analyze changed files for bugs and security issues
  • Check surrounding code context
  • Submit review summary

Overview: This PR replaces inline tool implementations in @supermemory/ai-sdk with re-exports from @supermemory/tools/ai-sdk, expanding the surface from 2 tools to 7.

Issues found:

Cursor Bugbot correctly identified that includeFullDocs is defined in the searchMemories schema (packages/tools/src/ai-sdk.ts:41-50) but never passed to client.search() in the execute function (line 68 only destructures informationToGet and limit). However, this bug exists in the base branch (feat/tools-seven-tool-parity / PR #1432), not in this PR. This PR correctly re-exports whatever the shared package provides. The fix belongs in #1432.

No new bugs or security issues are introduced by this PR:

  • The re-export pattern is correct
  • CI workflow changes properly detect changes in both packages/tools and packages/ai-sdk
  • The publish workflow's retry loop for npm dependency availability is a sensible pattern for monorepo publishing
  • Test changes appropriately use describe.skipIf for integration tests requiring API keys

Score: 9/10

Clean re-export with good test coverage and documentation updates. No bugs introduced by this PR. The one item to track is fixing includeFullDocs in the base PR (#1432) before merging the stack.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9c3f84b. Configure here.

export {
supermemoryTools,
searchMemoriesTool,
addMemoryTool,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search ignores includeFullDocs

Medium Severity

Replacing the inline tools with re-exports from @supermemory/tools/ai-sdk changes searchMemories: the tool schema still accepts includeFullDocs, but the shared implementation never passes it to client.search, unlike the removed @supermemory/ai-sdk code that forwarded it to search. Callers and models cannot control full-document inclusion in results.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9c3f84b. Configure here.

Comment thread packages/ai-sdk/src/tools.test.ts Outdated
Comment on lines +12 to +13
const testApiKey = process.env.SUPERMEMORY_API_KEY as string
const testOpenAIKey = process.env.OPENAI_API_KEY as string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables testApiKey and testOpenAIKey use type assertions (as string) to cast string | undefined to string. According to the style guide rule on Type assertions and casting, unnecessary type assertions should be avoided and type annotations should be used instead of assertions for object literals. While this is not an object literal, the spirit of the rule is to prefer type annotations over assertions. More importantly, using as string here is unsafe — it suppresses the undefined possibility without a runtime check. Consider using a non-null assertion only after a guard, or restructuring so the type is narrowed properly (e.g., via a runtime check before assignment).

Suggested change
const testApiKey = process.env.SUPERMEMORY_API_KEY as string
const testOpenAIKey = process.env.OPENAI_API_KEY as string
const testApiKey = process.env.SUPERMEMORY_API_KEY ?? (() => { throw new Error("SUPERMEMORY_API_KEY is not set") })()
const testOpenAIKey = process.env.OPENAI_API_KEY ?? (() => { throw new Error("OPENAI_API_KEY is not set") })()

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@Dhravya
Dhravya force-pushed the feat/ai-sdk-tool-reexports branch from acb8dc0 to 9c3f84b Compare August 8, 2026 02:47
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp 46d1b53 Sep 01 2026, 06:07 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 46d1b53 Commit Preview URL

Branch Preview URL
Sep 01 2026, 06:09 AM

Dhravya commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: This PR replaces inline tool implementations in @supermemory/ai-sdk with re-exports from @supermemory/tools/ai-sdk, adding 5 new tools to the surface.

Issues found:

Cursor Bugbot correctly identified that includeFullDocs is accepted in the searchMemories schema but not passed to client.search() in packages/tools/src/ai-sdk.ts:59-65. I verified this — the parameter is destructured on line 55 but never used. This bug exists in the base branch (feat/tools-seven-tool-parity) and should be fixed in PR #1432, not here.

The re-export itself is correct — this PR simply surfaces whatever the shared package provides.

Score: 8/10

The code change is straightforward and the test coverage looks good. Fix the includeFullDocs bug in the base PR before merging this stack.

Comment thread packages/ai-sdk/src/tools.ts

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: This PR replaces inline tool implementations in @supermemory/ai-sdk with re-exports from @supermemory/tools/ai-sdk, expanding the surface from 2 tools to 7.

Issues found:

Cursor Bugbot correctly identified the includeFullDocs parameter bug — it's accepted in the schema but never passed to client.search() in packages/tools/src/ai-sdk.ts:54. I verified this: line 54 destructures { informationToGet, limit } but omits includeFullDocs, even though lines 33-42 define it in the input schema.

However, this bug exists in the base branch (feat/tools-seven-tool-parity / PR #1432), not in this PR. This PR correctly re-exports whatever the shared package provides. The fix belongs in #1432, not here.

The re-export itself is correct, the CI workflow changes are solid, and the publish workflow's retry loop for npm dependency availability is a sensible pattern.

Score: 9/10

Clean re-export with good test coverage and documentation updates. The one outstanding item is fixing the includeFullDocs bug in the base PR before merging this stack.

ved015
ved015 previously approved these changes Aug 24, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: This PR replaces inline tool implementations in @supermemory/ai-sdk with re-exports from @supermemory/tools/ai-sdk, expanding the surface from 2 tools to 7.

Issues found:

Cursor Bugbot correctly identified the includeFullDocs parameter bug — it's defined in the schema (lines 33-42 of packages/tools/src/ai-sdk.ts) but not passed to client.search() in the execute function (line 54). However, this bug exists in the base branch (feat/tools-seven-tool-parity), not in this PR. This PR correctly re-exports whatever the shared package provides. The fix belongs in #1432.

The re-export itself is correct, CI workflow changes properly detect changes in both packages, and the publish workflow's retry loop for npm dependency availability is a sensible pattern.

Score: 9/10

Clean re-export with good test coverage and documentation updates. No bugs introduced by this PR. The one item to track is fixing includeFullDocs in the base PR (#1432) before merging the stack.

@graphite-app

graphite-app Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merge activity

@Dhravya
Dhravya force-pushed the feat/tools-seven-tool-parity branch from 6fac90e to d105cf5 Compare September 1, 2026 05:58
@Dhravya
Dhravya force-pushed the feat/ai-sdk-tool-reexports branch from dbafb2d to 35e20d9 Compare September 1, 2026 05:58
## Summary
- Re-export full tool set from `@supermemory/tools/ai-sdk`
- Add unit tests for tool re-exports

Stacked on #1432

## Test plan
- [ ] `bun run test:unit` in `packages/ai-sdk`

Made with [Cursor](https://cursor.com)
@graphite-app
graphite-app Bot force-pushed the feat/tools-seven-tool-parity branch from d105cf5 to de3bbb3 Compare September 1, 2026 06:00
@graphite-app
graphite-app Bot force-pushed the feat/ai-sdk-tool-reexports branch from 35e20d9 to 46d1b53 Compare September 1, 2026 06:00
graphite-app Bot pushed a commit that referenced this pull request Sep 1, 2026
## Summary
- **agent-framework**: proactive search tool descriptions
- **cartesia / pipecat**: v4 `client.add` + hybrid search, dedupe fixes, tests

Stacked on #1433

## Test plan
- [ ] pytest in agent-framework, cartesia, pipecat packages

Made with [Cursor](https://cursor.com)
@graphite-app
graphite-app Bot changed the base branch from feat/tools-seven-tool-parity to main September 1, 2026 06:06
@graphite-app
graphite-app Bot dismissed ved015’s stale review September 1, 2026 06:06

The base branch was changed.

@graphite-app
graphite-app Bot merged commit 46d1b53 into main Sep 1, 2026
6 of 7 checks passed
graphite-app Bot pushed a commit that referenced this pull request Sep 1, 2026
## Summary
- **agent-framework**: proactive search tool descriptions
- **cartesia / pipecat**: v4 `client.add` + hybrid search, dedupe fixes, tests

Stacked on #1433

## Test plan
- [ ] pytest in agent-framework, cartesia, pipecat packages

Made with [Cursor](https://cursor.com)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants